#include "../Core/Shader.h"
#include "../Core/Vertex.h"
#include "../Core/SceneManager.h"

#include "MainMenu.h"
#include "GamePlay.h"


//Shader* shader;
//GLuint vboId;

MainMenu::MainMenu()
: Scene()
{}

MainMenu::~MainMenu()
{
	//SAFE_DEL(shader);
}

__INT8 MainMenu::Init()
{
	glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
/*
	shader = new Shader();
	shader->Init("../../Resources/Shaders/TriangleShader.vsh", "../../Resources/Shaders/TriangleShader.fsh");*/

	return 0;
}

int k = 0;
__VOID MainMenu::Update(__FLOAT deltaTime)
{
	if (k > -1)
		k++;
	SceneManager* a = SceneManager::GetInstance();
	if (k > 60)
	{
		k = -1;
		GamePlay* gamePlay = new GamePlay();
		gamePlay->Init();
		SceneManager::GetInstance()->Switch(gamePlay);
	}
}

//__VOID MainMenu::Draw()
//{
//	/*glUseProgram(shader->m_Program);
//	glBindBuffer(GL_ARRAY_BUFFER, vboId);
//	int size;
//	glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size);
//	if (shader->a_VertextPos != -1)
//	{
//		glEnableVertexAttribArray(shader->a_VertextPos);
//		glVertexAttribPointer(shader->a_VertextPos, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), 0);
//	}
//
//	glDrawArrays(GL_TRIANGLES, 0, 3);
//
//	glBindBuffer(GL_ARRAY_BUFFER, 0);*/
//}

__VOID MainMenu::Exit()
{
	/*glDeleteBuffers(0, &vboId);*/
}